package com.zyz.E_面向对象.M_综合练习;

/**
 * @author: vick
 * @Date: 2025/3/16
 * @Description:
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        Animal dog = new Dog("dog", 3);
        Animal cat = new Cat("cat", 4);

        dog.makeSound();;
        dog.eat();
        Dog dog2 = (Dog) dog;
        dog2.play();


        cat.makeSound();;
        cat.eat();
        Cat cat2 = (Cat) cat;
        cat2.play();
    }
}
